import React, { PureComponent, Fragment } from 'react';
import { connect } from 'dva';
import moment from 'moment';
import { Editor } from 'react-draft-wysiwyg';
import { EditorState, convertToRaw, convertFromHTML, ContentState } from 'draft-js';
import draftToHtml from 'draftjs-to-html';
import htmlToDraft from 'html-to-draftjs';
import 'react-draft-wysiwyg/dist/react-draft-wysiwyg.css';

import {
  Row,
  Col,
  Card,
  Form,
  Input,
  Select,
  Icon,
  Button,
  Dropdown,
  Menu,
  InputNumber,
  DatePicker,
  Modal,
  message,
  Checkbox,
  Radio,
  Badge,
  Divider,
  Table,
} from 'antd';
const { RangePicker } = DatePicker;
const confirm = Modal.confirm;
import DescriptionList from 'components/DescriptionList';
const { Description } = DescriptionList;
const RadioGroup = Radio.Group;

import { evalConfigList, getByParentCode, getProvince, evalConfigSave } from '../../services/api';

import StandardTable from 'components/StandardTable';
import PageHeaderLayout from '../../layouts/PageHeaderLayout';

import { getArrFromObj } from '../../utils/utils';

import styles from './highValuationConfig.less';

const FormItem = Form.Item;
const { Option } = Select;
const getValue = obj =>
  Object.keys(obj)
    .map(key => obj[key])
    .join(',');

@connect(({ notice, loading }) => {
  return {
    notice,
    loading: loading.models.notice,
  };
})
@Form.create()
export default class List extends PureComponent {
  state = {
    authRule: 0,
    provinceList: [],
    provinceId: null,
    cities: [],
    cityId: null,
    config: {},
    showConfig: false,
  };

  async componentDidMount() {
    await this.getProvince();
  }

  async getProvince() {
    const { code, message, data } = await getProvince({});

    if (code === 200) {
      const provinceList = getArrFromObj(data);

      this.setState(
        {
          provinceList,
          provinceId: provinceList[0].id,
        },
        () => {
          this.getByParentCode(provinceList[0].id);
        }
      );
    } else {
      message.error(response.message);
    }
  }

  async getByParentCode(provinceId) {
    const { code, message, data } = await getByParentCode({ parentCode: provinceId });

    if (code === 200) {
      const cities = [{ id: '-1', name: '请选择市' }].concat(getArrFromObj(data));
      this.setState({
        cities,
        cityId: cities[0].id,
      });
    } else {
      message.error(response.message);
    }
  }

  async evalConfigList() {
    const { authRule, provinceId, cityId } = this.state;
    let params = {
      authRule,
    };
    if (provinceId && authRule === 1) {
      params.provinceCode = provinceId;
    }
    if (cityId && authRule === 1) {
      params.cityCode = cityId;
    }

    if (params.cityCode === '-1') {
      delete params.cityCode;
    }

    const { code, message, data } = await evalConfigList(params);
    if (!data.content) {
      data.content = '';
    }
    if (code === 200) {
      this.setState({
        config: data,
        showConfig: true,
        ...this.buildExplain(data.explainList),
      });
    } else {
      message.error(message);
    }
  }

  buildExplain(list) {
    const obj = {
      financeMinScore1: null,
      financeMaxScore1: null,
      financeExplainDesc1: '',
      financeMinScore2: null,
      financeMaxScore2: null,
      financeExplainDesc2: '',
      financeMinScore3: null,
      financeMaxScore3: null,
      financeExplainDesc3: '',
      financeMinScore4: null,
      financeMaxScore4: null,
      financeExplainDesc4: '',
      ipMinScore1: null,
      ipMaxScore1: null,
      ipExplainDesc1: '',
      ipMinScore2: null,
      ipMaxScore2: null,
      ipExplainDesc2: '',
      ipMinScore3: null,
      ipMaxScore3: null,
      ipExplainDesc3: '',
      ipMinScore4: null,
      ipMaxScore4: null,
      ipExplainDesc4: '',
      manageMinScore1: null,
      manageMaxScore1: null,
      manageExplainDesc1: '',
      manageMinScore2: null,
      manageMaxScore2: null,
      manageExplainDesc2: '',
      manageMinScore3: null,
      manageMaxScore3: null,
      manageExplainDesc3: '',
      manageMinScore4: null,
      manageMaxScore4: null,
      manageExplainDesc4: '',
      summaryMinScore1: null,
      summaryMaxScore1: null,
      summaryExplainDesc1: '',
      summaryMinScore2: null,
      summaryMaxScore2: null,
      summaryExplainDesc2: '',
      summaryMinScore3: null,
      summaryMaxScore3: null,
      summaryExplainDesc3: '',
      summaryMinScore4: null,
      summaryMaxScore4: null,
      summaryExplainDesc4: '',
    };

    const ipExplains = list.filter(item => item.explainType === 2);
    ipExplains.map((item, index) => {
      obj['ipMinScore' + (index + 1)] = item.minScore;
      obj['ipMaxScore' + (index + 1)] = item.maxScore;
      obj['ipExplainDesc' + (index + 1)] = item.explainDesc;
    });

    const financeExplains = list.filter(item => item.explainType === 3);
    financeExplains.map((item, index) => {
      obj['financeMinScore' + (index + 1)] = item.minScore;
      obj['financeMaxScore' + (index + 1)] = item.maxScore;
      obj['financeExplainDesc' + (index + 1)] = item.explainDesc;
    });

    const manageExplains = list.filter(item => item.explainType === 4);
    manageExplains.map((item, index) => {
      obj['manageMinScore' + (index + 1)] = item.minScore;
      obj['manageMaxScore' + (index + 1)] = item.maxScore;
      obj['manageExplainDesc' + (index + 1)] = item.explainDesc;
    });

    const summaryExplains = list.filter(item => item.explainType === 5);
    summaryExplains.map((item, index) => {
      obj['summaryMinScore' + (index + 1)] = item.minScore;
      obj['summaryMaxScore' + (index + 1)] = item.maxScore;
      obj['summaryExplainDesc' + (index + 1)] = item.explainDesc;
    });
    debugger;
    return obj;
  }

  clone(obj) {
    var o;
    if (typeof obj == 'object') {
      if (obj === null) {
        o = null;
      } else {
        if (obj instanceof Array) {
          o = [];
          for (var i = 0, len = obj.length; i < len; i++) {
            o.push(this.clone(obj[i]));
          }
        } else {
          o = {};
          for (var j in obj) {
            o[j] = this.clone(obj[j]);
          }
        }
      }
    } else {
      o = obj;
    }
    return o;
  }

  handleOnchange(field, e) {
    this.setState({
      [field]: e.target.value,
    });
  }

  handleConfigOnchange(field, e) {
    const _config = this.clone(this.state.config);
    _config[field] = e.target.value;
    setTimeout(() => {
      this.setState({
        config: _config,
      });
    });
  }

  onChange(field, value, dateString) {
    this.setState({
      [field]: dateString,
    });
  }

  onRadioChange(e) {
    this.setState({
      siteNoticeType: e.target.value,
    });
  }

  onOk() {}

  handleSelectOnchange(field, value) {
    this.setState({
      [field]: value,
    });
  }

  renderTable1() {
    return (
      <Table
        showHeader={false}
        pagination={false}
        columns={[
          {
            title: 'type',
            dataIndex: 'type',
            width: 200,
            render: (value, row, index) => {
              const obj = {
                children: value,
                props: {},
              };
              if (index === 0) {
                obj.props.rowSpan = 5;
              }
              // These two are merged into above cell
              if (index === 1) {
                obj.props.rowSpan = 0;
              }
              if (index === 2) {
                obj.props.colSpan = 0;
              }
              if (index === 3) {
                obj.props.rowSpan = 0;
              }
              if (index === 4) {
                obj.props.colSpan = 0;
              }
              return obj;
            },
          },
          {
            title: 'condition',
            width: 250,
            dataIndex: 'condition',
            render: (value, row, index) => {
              const obj = {
                children: value,
                props: {},
              };
              if (index === 5) {
                obj.props.colSpan = 4;
              }
              return obj;
            },
          },
          {
            title: 'stage',
            colSpan: 2,
            dataIndex: 'stage',
            render: (value, row, index) => {
              const obj = {
                children: value,
                props: {},
              };
              return obj;
            },
          },
          {
            title: 'score',
            colSpan: 0,
            width: 250,
            dataIndex: 'score',
            render: (value, row, index) => {
              const obj = {
                children: value,
                props: {},
              };
              return obj;
            },
          },
        ]}
        dataSource={[
          {
            key: '1',
            type: '企业知识产权数量：',
            condition: '条件',
            stage: '阶梯（知识产权数量）',
            score: '得分（分值）',
          },
          {
            key: '2',
            type: '-',
            condition: 'i类知识产权',
            stage: '1项以上',
            score: '7',
          },
          {
            key: '3',
            type: '-',
            condition: 'II类知识产权',
            stage: '5项及以上',
            score: '6',
          },
          {
            key: '4',
            type: '-',
            condition: 'II类知识产权',
            stage: '3—4项',
            score: '4',
          },
          {
            key: '5',
            type: '-',
            condition: 'II类知识产权',
            stage: '1—2项',
            score: '2',
          },
        ]}
        bordered
      />
    );
  }

  renderTable2() {
    return (
      <Table
        showHeader={false}
        pagination={false}
        columns={[
          {
            title: 'type',
            dataIndex: 'type',
            width: 200,
            render: (value, row, index) => {
              const obj = {
                children: value,
                props: {},
              };
              if (index === 0) {
                obj.props.rowSpan = 6;
              }
              // These two are merged into above cell
              if (index === 1) {
                obj.props.rowSpan = 0;
              }
              if (index === 2) {
                obj.props.colSpan = 0;
              }
              if (index === 3) {
                obj.props.rowSpan = 0;
              }
              if (index === 4) {
                obj.props.colSpan = 0;
              }
              if (index === 5) {
                obj.props.colSpan = 0;
              }
              return obj;
            },
          },
          {
            title: 'condition',
            width: 250,
            dataIndex: 'condition',
            render: (value, row, index) => {
              const obj = {
                children: value,
                props: {},
              };

              return obj;
            },
          },
          {
            title: 'stage',
            colSpan: 2,
            dataIndex: 'stage',
            render: (value, row, index) => {
              const obj = {
                children: value,
                props: {},
              };
              return obj;
            },
          },
          {
            title: 'score',
            colSpan: 0,
            width: 250,
            dataIndex: 'score',
            render: (value, row, index) => {
              const obj = {
                children: value,
                props: {},
              };
              return obj;
            },
          },
        ]}
        dataSource={[
          {
            key: '1',
            type: '企业获得知识产权方式：',
            condition: '条件',
            stage: '阶梯（知识产权数量）',
            score: '得分（分值）',
          },
          {
            key: '2',
            type: '-',
            condition: '自主研发',
            stage: '1-3项',
            score: '2',
          },
          {
            key: '3',
            type: '-',
            condition: '自主研发',
            stage: '4项以上',
            score: '4',
          },
          {
            key: '4',
            type: '-',
            condition: '仅受让、受赠和并购方式取得',
            stage: '5项及以上',
            score: '3',
          },
          {
            key: '5',
            type: '-',
            condition: '仅受让、受赠和并购方式取得',
            stage: '3—4项',
            score: '2',
          },
          {
            key: '6',
            type: '-',
            condition: '仅受让、受赠和并购方式取得',
            stage: '1—2项',
            score: '1',
          },
        ]}
        bordered
      />
    );
  }

  renderTable3() {
    return (
      <Table
        showHeader={false}
        pagination={false}
        columns={[
          {
            title: 'type',
            dataIndex: 'type',
            width: 200,
            render: (value, row, index) => {
              const obj = {
                children: value,
                props: {},
              };
              if (index === 0) {
                obj.props.rowSpan = 6;
              }
              // These two are merged into above cell
              if (index === 1) {
                obj.props.rowSpan = 0;
              }
              if (index === 2) {
                obj.props.colSpan = 0;
              }
              if (index === 3) {
                obj.props.rowSpan = 0;
              }
              if (index === 4) {
                obj.props.colSpan = 0;
              }
              if (index === 5) {
                obj.props.colSpan = 0;
              }
              return obj;
            },
          },
          {
            title: 'condition',
            width: 250,
            dataIndex: 'condition',
            render: (value, row, index) => {
              const obj = {
                children: value,
                props: {},
              };

              return obj;
            },
          },
          {
            title: 'stage',
            colSpan: 2,
            dataIndex: 'stage',
            render: (value, row, index) => {
              const obj = {
                children: value,
                props: {},
              };
              return obj;
            },
          },
          {
            title: 'score',
            colSpan: 0,
            width: 250,
            dataIndex: 'score',
            render: (value, row, index) => {
              const obj = {
                children: value,
                props: {},
              };
              return obj;
            },
          },
        ]}
        dataSource={[
          {
            key: '1',
            type: '对主要产品（服务）在技术上发挥核心支持作用：',
            condition: '条件',
            stage: '阶梯（知识产权数量）',
            score: '得分（分值）',
          },
          {
            key: '2',
            type: '-',
            condition: '相关知识产权数与总数占比',
            stage: '小于50%（含）',
            score: '2',
          },
          {
            key: '3',
            type: '-',
            condition: '相关知识产权数与总数占比',
            stage: '50%—60%（含）',
            score: '3',
          },
          {
            key: '4',
            type: '-',
            condition: '相关知识产权数与总数占比',
            stage: '60%—70%（含）',
            score: '5',
          },
          {
            key: '5',
            type: '-',
            condition: '相关知识产权数与总数占比',
            stage: '70%以上',
            score: '7',
          },
          {
            key: '6',
            type: '-',
            condition: '相关知识产权数与总数占比',
            stage: '超出100%',
            score: '0',
          },
        ]}
        bordered
      />
    );
  }

  renderTable4() {
    return (
      <Table
        showHeader={false}
        pagination={false}
        columns={[
          {
            title: 'type',
            dataIndex: 'type',
            width: 200,
            render: (value, row, index) => {
              const obj = {
                children: value,
                props: {},
              };
              if (index === 0) {
                obj.props.rowSpan = 4;
              }
              // These two are merged into above cell
              if (index === 1) {
                obj.props.rowSpan = 0;
              }
              if (index === 2) {
                obj.props.colSpan = 0;
              }
              if (index === 3) {
                obj.props.rowSpan = 0;
              }
              return obj;
            },
          },
          {
            title: 'condition',
            width: 250,
            dataIndex: 'condition',
            render: (value, row, index) => {
              const obj = {
                children: value,
                props: {},
              };

              return obj;
            },
          },
          {
            title: 'stage',
            colSpan: 2,
            dataIndex: 'stage',
            render: (value, row, index) => {
              const obj = {
                children: value,
                props: {},
              };
              return obj;
            },
          },
          {
            title: 'score',
            colSpan: 0,
            width: 250,
            dataIndex: 'score',
            render: (value, row, index) => {
              const obj = {
                children: value,
                props: {},
              };
              return obj;
            },
          },
        ]}
        dataSource={[
          {
            key: '1',
            type: '技术的先进程度：',
            condition: '条件',
            stage: '阶梯（知识产权数量）',
            score: '得分（分值）',
          },
          {
            key: '2',
            type: '-',
            condition: '用户填写知识产权总数',
            stage: '1-2项',
            score: '4',
          },
          {
            key: '3',
            type: '-',
            condition: '用户填写知识产权总数',
            stage: '3-5项',
            score: '6',
          },
          {
            key: '4',
            type: '-',
            condition: '用户填写知识产权总数',
            stage: '超过5项',
            score: '7',
          },
        ]}
        bordered
      />
    );
  }

  renderTable5() {
    return (
      <Table
        showHeader={false}
        pagination={false}
        columns={[
          {
            title: 'type',
            dataIndex: 'type',
            width: 200,
            render: (value, row, index) => {
              const obj = {
                children: value,
                props: {},
              };
              if (index === 0) {
                obj.props.rowSpan = 2;
              }
              // These two are merged into above cell
              if (index === 1) {
                obj.props.rowSpan = 0;
              }
              return obj;
            },
          },
          {
            title: 'condition',
            width: 250,
            dataIndex: 'condition',
            render: (value, row, index) => {
              const obj = {
                children: value,
                props: {},
              };

              return obj;
            },
          },
          {
            title: 'stage',
            colSpan: 2,
            dataIndex: 'stage',
            render: (value, row, index) => {
              const obj = {
                children: value,
                props: {},
              };
              return obj;
            },
          },
          {
            title: 'score',
            colSpan: 0,
            width: 250,
            dataIndex: 'score',
            render: (value, row, index) => {
              const obj = {
                children: value,
                props: {},
              };
              return obj;
            },
          },
        ]}
        dataSource={[
          {
            key: '1',
            type: '技术的先进程度：',
            condition: '条件',
            stage: '阶梯（知识产权数量）',
            score: '得分（分值）',
          },
          {
            key: '2',
            type: '-',
            condition: '有',
            stage: ' ',
            score: '1',
          },
        ]}
        bordered
      />
    );
  }

  renderTable6() {
    return (
      <Table
        showHeader={false}
        pagination={false}
        columns={[
          {
            title: 'type',
            dataIndex: 'type',
            width: 200,
            render: (value, row, index) => {
              const obj = {
                children: value,
                props: {},
              };
              if (index === 0) {
                obj.props.rowSpan = 16;
              }
              // These two are merged into above cell
              if (index >= 1) {
                obj.props.rowSpan = 0;
              }
              return obj;
            },
          },
          {
            title: 'condition',
            width: 250,
            dataIndex: 'condition',
            render: (value, row, index) => {
              const obj = {
                children: value,
                props: {},
              };

              return obj;
            },
          },
          {
            title: 'stage',
            colSpan: 2,
            dataIndex: 'stage',
            render: (value, row, index) => {
              const obj = {
                children: value,
                props: {},
              };
              return obj;
            },
          },
          {
            title: 'score',
            colSpan: 0,
            width: 250,
            dataIndex: 'score',
            render: (value, row, index) => {
              const obj = {
                children: value,
                props: {},
              };
              return obj;
            },
          },
        ]}
        dataSource={[
          {
            key: '1',
            type: '科技成果转化情况：',
            condition: '条件',
            stage: '阶梯（知识产权数量）',
            score: '得分（分值）',
          },
          {
            key: '2',
            type: '-',
            condition: '近三年知识产权总量（注册满3年）',
            stage: '15项以上（含）',
            score: '26',
          },
          {
            key: '3',
            type: '-',
            condition: '近三年知识产权总量（注册满3年）',
            stage: '12项',
            score: '20',
          },
          {
            key: '4',
            type: '-',
            condition: '近三年知识产权总量（注册满3年）',
            stage: '9项',
            score: '17',
          },
          {
            key: '2',
            type: '-',
            condition: '近三年知识产权总量（注册满3年）',
            stage: '6项',
            score: '12',
          },
          {
            key: '3',
            type: '-',
            condition: '近三年知识产权总量（注册满3年）',
            stage: '3项',
            score: '6',
          },
          {
            key: '4',
            type: '-',
            condition: '近三年知识产权总量（注册满2年）',
            stage: '10项以上（含）',
            score: '24',
          },
          {
            key: '4',
            type: '-',
            condition: '近三年知识产权总量（注册满2年）',
            stage: '8项',
            score: '19',
          },
          {
            key: '4',
            type: '-',
            condition: '近三年知识产权总量（注册满2年）',
            stage: '6项',
            score: '16',
          },
          {
            key: '4',
            type: '-',
            condition: '近三年知识产权总量（注册满2年）',
            stage: '4项',
            score: '11',
          },
          {
            key: '4',
            type: '-',
            condition: '近三年知识产权总量（注册满2年）',
            stage: '2项',
            score: '5',
          },
          {
            key: '4',
            type: '-',
            condition: '近三年知识产权总量（注册满1年）',
            stage: '5项以上（含）',
            score: '22',
          },
          {
            key: '4',
            type: '-',
            condition: '近三年知识产权总量（注册满1年）',
            stage: '4项',
            score: '18',
          },
          {
            key: '4',
            type: '-',
            condition: '近三年知识产权总量（注册满1年）',
            stage: '3项',
            score: '14',
          },
          {
            key: '4',
            type: '-',
            condition: '近三年知识产权总量（注册满1年）',
            stage: '2项',
            score: '10',
          },
          {
            key: '4',
            type: '-',
            condition: '近三年知识产权总量（注册满1年）',
            stage: '1项',
            score: '5',
          },
        ]}
        bordered
      />
    );
  }

  renderTable7() {
    return (
      <Table
        showHeader={false}
        pagination={false}
        columns={[
          {
            title: 'type',
            dataIndex: 'type',
            width: 200,
            render: (value, row, index) => {
              const obj = {
                children: value,
                props: {},
              };
              if (index === 0) {
                obj.props.rowSpan = 4;
              }
              // These two are merged into above cell
              if (index >= 1) {
                obj.props.rowSpan = 0;
              }
              return obj;
            },
          },
          {
            title: 'condition',
            width: 250,
            dataIndex: 'condition',
            render: (value, row, index) => {
              const obj = {
                children: value,
                props: {},
              };

              return obj;
            },
          },
          {
            title: 'score',
            colSpan: 0,
            width: 250,
            dataIndex: 'score',
            render: (value, row, index) => {
              const obj = {
                children: value,
                props: {},
              };
              return obj;
            },
          },
        ]}
        dataSource={[
          {
            key: '1',
            type: '研发管理制度建设情况：',
            condition: '条件',
            score: '得分（分值）',
          },
          {
            key: '2',
            type: '-',
            condition: '已制定企业研究开发的组织管理制度',
            score: '2',
          },
          {
            key: '2',
            type: '-',
            condition: '已经建立了研发投入核算体系',
            score: '2',
          },
          {
            key: '2',
            type: '-',
            condition: '已经编制了研发费用辅助账',
            score: '2',
          },
        ]}
        bordered
      />
    );
  }

  renderTable8() {
    return (
      <Table
        showHeader={false}
        pagination={false}
        columns={[
          {
            title: 'type',
            dataIndex: 'type',
            width: 200,
            render: (value, row, index) => {
              const obj = {
                children: value,
                props: {},
              };
              if (index === 0) {
                obj.props.rowSpan = 4;
              }
              // These two are merged into above cell
              if (index >= 1) {
                obj.props.rowSpan = 0;
              }
              return obj;
            },
          },
          {
            title: 'condition',
            width: 250,
            dataIndex: 'condition',
            render: (value, row, index) => {
              const obj = {
                children: value,
                props: {},
              };

              return obj;
            },
          },
          {
            title: 'score',
            colSpan: 0,
            width: 250,
            dataIndex: 'score',
            render: (value, row, index) => {
              const obj = {
                children: value,
                props: {},
              };
              return obj;
            },
          },
        ]}
        dataSource={[
          {
            key: '1',
            type: '自主研发及合作情况：',
            condition: '条件',
            score: '得分（分值）',
          },
          {
            key: '2',
            type: '-',
            condition: '已自主设立研发机构',
            score: '3',
          },
          {
            key: '2',
            type: '-',
            condition: '与高校/科研院所开展产学研合作',
            score: '3',
          },
        ]}
        bordered
      />
    );
  }

  renderTable9() {
    return (
      <Table
        showHeader={false}
        pagination={false}
        columns={[
          {
            title: 'type',
            dataIndex: 'type',
            width: 200,
            render: (value, row, index) => {
              const obj = {
                children: value,
                props: {},
              };
              if (index === 0) {
                obj.props.rowSpan = 4;
              }
              // These two are merged into above cell
              if (index >= 1) {
                obj.props.rowSpan = 0;
              }
              return obj;
            },
          },
          {
            title: 'condition',
            width: 250,
            dataIndex: 'condition',
            render: (value, row, index) => {
              const obj = {
                children: value,
                props: {},
              };

              return obj;
            },
          },
          {
            title: 'score',
            colSpan: 0,
            width: 250,
            dataIndex: 'score',
            render: (value, row, index) => {
              const obj = {
                children: value,
                props: {},
              };
              return obj;
            },
          },
        ]}
        dataSource={[
          {
            key: '1',
            type: '成果转化激励及创新情况：',
            condition: '条件',
            score: '得分（分值）',
          },
          {
            key: '2',
            type: '-',
            condition: '已建立科技成果转化的组织实施与激励奖励制度',
            score: '2',
          },
          {
            key: '2',
            type: '-',
            condition: '已具备开放式的创新创业平台',
            score: '2',
          },
        ]}
        bordered
      />
    );
  }

  renderTable10() {
    return (
      <Table
        showHeader={false}
        pagination={false}
        columns={[
          {
            title: 'type',
            dataIndex: 'type',
            width: 200,
            render: (value, row, index) => {
              const obj = {
                children: value,
                props: {},
              };
              if (index === 0) {
                obj.props.rowSpan = 4;
              }
              // These two are merged into above cell
              if (index >= 1) {
                obj.props.rowSpan = 0;
              }
              return obj;
            },
          },
          {
            title: 'condition',
            width: 250,
            dataIndex: 'condition',
            render: (value, row, index) => {
              const obj = {
                children: value,
                props: {},
              };

              return obj;
            },
          },
          {
            title: 'score',
            colSpan: 0,
            width: 250,
            dataIndex: 'score',
            render: (value, row, index) => {
              const obj = {
                children: value,
                props: {},
              };
              return obj;
            },
          },
        ]}
        dataSource={[
          {
            key: '1',
            type: '人才培养及激励方法情况：',
            condition: '条件',
            score: '得分（分值）',
          },
          {
            key: '2',
            type: '-',
            condition: '已具备科技人员的培养进修、职工技能培训、优秀人才引进制度',
            score: '2',
          },
          {
            key: '2',
            type: '-',
            condition: '已具备科技人才绩效评价奖励制度',
            score: '2',
          },
        ]}
        bordered
      />
    );
  }

  renderTable11() {
    return (
      <Table
        showHeader={false}
        pagination={false}
        columns={[
          {
            title: 'type',
            dataIndex: 'type',
            width: 200,
            render: (value, row, index) => {
              const obj = {
                children: value,
                props: {},
              };
              if (index === 0) {
                obj.props.rowSpan = 4;
              }
              // These two are merged into above cell
              if (index >= 1) {
                obj.props.rowSpan = 0;
              }
              return obj;
            },
          },
          {
            title: 'condition',
            width: 250,
            dataIndex: 'condition',
            render: (value, row, index) => {
              const obj = {
                children: value,
                props: {},
              };

              return obj;
            },
          },
          {
            title: 'score',
            colSpan: 0,
            width: 250,
            dataIndex: 'score',
            render: (value, row, index) => {
              const obj = {
                children: value,
                props: {},
              };
              return obj;
            },
          },
        ]}
        dataSource={[
          {
            key: '1',
            type: '前三年累计研发费用占比情况：',
            condition: '条件',
            score: '达成情况',
          },
          {
            key: '2',
            type: '-',
            condition: '满足其中任一项',
            score: '达成',
          },
        ]}
        bordered
      />
    );
  }

  renderTable12() {
    return (
      <Table
        showHeader={false}
        pagination={false}
        columns={[
          {
            title: 'type',
            dataIndex: 'type',
            width: 200,
            render: (value, row, index) => {
              const obj = {
                children: value,
                props: {},
              };
              if (index === 0) {
                obj.props.rowSpan = 4;
              }
              // These two are merged into above cell
              if (index >= 1) {
                obj.props.rowSpan = 0;
              }
              return obj;
            },
          },
          {
            title: 'condition',
            width: 250,
            dataIndex: 'condition',
            render: (value, row, index) => {
              const obj = {
                children: value,
                props: {},
              };

              return obj;
            },
          },
          {
            title: 'score',
            colSpan: 0,
            width: 250,
            dataIndex: 'score',
            render: (value, row, index) => {
              const obj = {
                children: value,
                props: {},
              };
              return obj;
            },
          },
        ]}
        dataSource={[
          {
            key: '1',
            type: '境内研发费用占比情况：',
            condition: '条件',
            score: '达成情况',
          },
          {
            key: '2',
            type: '-',
            condition: '60%',
            score: '达成',
          },
        ]}
        bordered
      />
    );
  }

  renderTable13() {
    return (
      <Table
        showHeader={false}
        pagination={false}
        columns={[
          {
            title: 'type',
            dataIndex: 'type',
            width: 200,
            render: (value, row, index) => {
              const obj = {
                children: value,
                props: {},
              };
              if (index === 0) {
                obj.props.rowSpan = 4;
              }
              // These two are merged into above cell
              if (index >= 1) {
                obj.props.rowSpan = 0;
              }
              return obj;
            },
          },
          {
            title: 'condition',
            width: 250,
            dataIndex: 'condition',
            render: (value, row, index) => {
              const obj = {
                children: value,
                props: {},
              };

              return obj;
            },
          },
          {
            title: 'score',
            colSpan: 0,
            width: 250,
            dataIndex: 'score',
            render: (value, row, index) => {
              const obj = {
                children: value,
                props: {},
              };
              return obj;
            },
          },
        ]}
        dataSource={[
          {
            key: '1',
            type: '上一年度高新技术产品（服务）收入占比',
            condition: '条件',
            score: '达成情况',
          },
          {
            key: '2',
            type: '-',
            condition: '60%',
            score: '达成',
          },
        ]}
        bordered
      />
    );
  }

  renderTable14() {
    return (
      <Table
        showHeader={false}
        pagination={false}
        columns={[
          {
            title: 'type',
            dataIndex: 'type',
            width: 200,
            render: (value, row, index) => {
              const obj = {
                children: value,
                props: {},
              };
              if (index === 0) {
                obj.props.rowSpan = 6;
              }
              // These two are merged into above cell
              if (index >= 1) {
                obj.props.rowSpan = 0;
              }
              return obj;
            },
          },
          {
            title: 'condition',
            width: 250,
            dataIndex: 'condition',
            render: (value, row, index) => {
              const obj = {
                children: value,
                props: {},
              };

              return obj;
            },
          },
          {
            title: 'score',
            colSpan: 0,
            width: 250,
            dataIndex: 'score',
            render: (value, row, index) => {
              const obj = {
                children: value,
                props: {},
              };
              return obj;
            },
          },
        ]}
        dataSource={[
          {
            key: '1',
            type: '净资产增长率（不足2年的企业0分）：',
            condition: '条件',
            score: '得分（分值）',
          },
          {
            key: '2',
            type: '-',
            condition: '>=35%',
            score: '9',
          },
          {
            key: '3',
            type: '-',
            condition: '>=25%',
            score: '7',
          },
          {
            key: '4',
            type: '-',
            condition: '>=15%',
            score: '6',
          },
          {
            key: '5',
            type: '-',
            condition: '>=5%',
            score: '4',
          },
          {
            key: '6',
            type: '-',
            condition: '>0',
            score: '2',
          },
        ]}
        bordered
      />
    );
  }

  renderTable15() {
    return (
      <Table
        showHeader={false}
        pagination={false}
        columns={[
          {
            title: 'type',
            dataIndex: 'type',
            width: 200,
            render: (value, row, index) => {
              const obj = {
                children: value,
                props: {},
              };
              if (index === 0) {
                obj.props.rowSpan = 6;
              }
              // These two are merged into above cell
              if (index >= 1) {
                obj.props.rowSpan = 0;
              }
              return obj;
            },
          },
          {
            title: 'condition',
            width: 250,
            dataIndex: 'condition',
            render: (value, row, index) => {
              const obj = {
                children: value,
                props: {},
              };

              return obj;
            },
          },
          {
            title: 'score',
            colSpan: 0,
            width: 250,
            dataIndex: 'score',
            render: (value, row, index) => {
              const obj = {
                children: value,
                props: {},
              };
              return obj;
            },
          },
        ]}
        dataSource={[
          {
            key: '1',
            type: '销售收入增长率（不足2年的企业0分）：',
            condition: '条件',
            score: '得分（分值）',
          },
          {
            key: '2',
            type: '-',
            condition: '>=35%',
            score: '9',
          },
          {
            key: '3',
            type: '-',
            condition: '>=25%',
            score: '7',
          },
          {
            key: '4',
            type: '-',
            condition: '>=15%',
            score: '6',
          },
          {
            key: '5',
            type: '-',
            condition: '>=5%',
            score: '4',
          },
          {
            key: '6',
            type: '-',
            condition: '>0',
            score: '2',
          },
        ]}
        bordered
      />
    );
  }

  getExplainList() {
    const {
      financeMinScore1,
      financeMaxScore1,
      financeExplainDesc1,
      financeMinScore2,
      financeMaxScore2,
      financeExplainDesc2,
      financeMinScore3,
      financeMaxScore3,
      financeExplainDesc3,
      financeMinScore4,
      financeMaxScore4,
      financeExplainDesc4,
      ipMinScore1,
      ipMaxScore1,
      ipExplainDesc1,
      ipMinScore2,
      ipMaxScore2,
      ipExplainDesc2,
      ipMinScore3,
      ipMaxScore3,
      ipExplainDesc3,
      ipMinScore4,
      ipMaxScore4,
      ipExplainDesc4,
      manageMinScore1,
      manageMaxScore1,
      manageExplainDesc1,
      manageMinScore2,
      manageMaxScore2,
      manageExplainDesc2,
      manageMinScore3,
      manageMaxScore3,
      manageExplainDesc3,
      manageMinScore4,
      manageMaxScore4,
      manageExplainDesc4,
      summaryMinScore1,
      summaryMaxScore1,
      summaryExplainDesc1,
      summaryMinScore2,
      summaryMaxScore2,
      summaryExplainDesc2,
      summaryMinScore3,
      summaryMaxScore3,
      summaryExplainDesc3,
      summaryMinScore4,
      summaryMaxScore4,
      summaryExplainDesc4,
    } = this.state;

    let list = [];
    if (financeExplainDesc1) {
      list.push({
        minScore: financeMinScore1,
        maxScore: financeMaxScore1,
        explainDesc: financeExplainDesc1,
        explainType: 3,
      });
    }
    if (financeExplainDesc2) {
      list.push({
        minScore: financeMinScore2,
        maxScore: financeMaxScore2,
        explainDesc: financeExplainDesc2,
        explainType: 3,
      });
    }
    if (financeExplainDesc3) {
      list.push({
        minScore: financeMinScore3,
        maxScore: financeMaxScore3,
        explainDesc: financeExplainDesc3,
        explainType: 3,
      });
    }
    if (financeExplainDesc4) {
      list.push({
        minScore: financeMinScore4,
        maxScore: financeMaxScore4,
        explainDesc: financeExplainDesc4,
        explainType: 3,
      });
    }

    if (ipExplainDesc1) {
      list.push({
        minScore: ipMinScore1,
        maxScore: ipMaxScore1,
        explainDesc: ipExplainDesc1,
        explainType: 2,
      });
    }
    if (ipExplainDesc2) {
      list.push({
        minScore: ipMinScore2,
        maxScore: ipMaxScore2,
        explainDesc: ipExplainDesc2,
        explainType: 2,
      });
    }
    if (ipExplainDesc3) {
      list.push({
        minScore: ipMinScore3,
        maxScore: ipMaxScore3,
        explainDesc: ipExplainDesc3,
        explainType: 2,
      });
    }
    if (ipExplainDesc4) {
      list.push({
        minScore: ipMinScore4,
        maxScore: ipMaxScore4,
        explainDesc: ipExplainDesc4,
        explainType: 2,
      });
    }

    if (manageExplainDesc1) {
      list.push({
        minScore: manageMinScore1,
        maxScore: manageMaxScore1,
        explainDesc: manageExplainDesc1,
        explainType: 4,
      });
    }
    if (manageExplainDesc2) {
      list.push({
        minScore: manageMinScore2,
        maxScore: manageMaxScore2,
        explainDesc: manageExplainDesc2,
        explainType: 4,
      });
    }
    if (manageExplainDesc3) {
      list.push({
        minScore: manageMinScore3,
        maxScore: manageMaxScore3,
        explainDesc: manageExplainDesc3,
        explainType: 4,
      });
    }
    if (manageExplainDesc4) {
      list.push({
        minScore: manageMinScore4,
        maxScore: manageMaxScore4,
        explainDesc: manageExplainDesc4,
        explainType: 4,
      });
    }

    if (summaryExplainDesc1) {
      list.push({
        minScore: summaryMinScore1,
        maxScore: summaryMaxScore1,
        explainDesc: summaryExplainDesc1,
        explainType: 5,
      });
    }
    if (summaryExplainDesc2) {
      list.push({
        minScore: summaryMinScore2,
        maxScore: summaryMaxScore2,
        explainDesc: summaryExplainDesc2,
        explainType: 5,
      });
    }
    if (summaryExplainDesc3) {
      list.push({
        minScore: summaryMinScore3,
        maxScore: summaryMaxScore3,
        explainDesc: summaryExplainDesc3,
        explainType: 5,
      });
    }
    if (summaryExplainDesc4) {
      list.push({
        minScore: summaryMinScore4,
        maxScore: summaryMaxScore4,
        explainDesc: summaryExplainDesc4,
        explainType: 5,
      });
    }

    return list;
  }

  async evalConfigSave() {
    const { id, authRule, provinceId, cityId, config } = this.state;

    const explainList = this.getExplainList();
    debugger;
    const {
      regToYear,
      researcherRate,
      totalScoreReq,
      itemList,
      baseDesc,
      financeDesc,
      ipDesc,
      manageDesc,
      summaryDesc,
      content,
    } = config;
    let params = {
      id,
      authRule,
      baseDesc,
      financeDesc,
      ipDesc,
      manageDesc,
      summaryDesc,
      content,
      itemList,
      regToYear,
      researcherRate,
      totalScoreReq,
      explainList,
    };

    if (authRule) {
      params.provinceCode = provinceId;
      params.cityCode = cityId;
    }
    if (params.cityCode === '-1') {
      delete params.cityCode;
    }

    const { code, message, data } = await evalConfigSave(params);

    if (code === 200) {
      this.setState({
        showConfig: true,
      });
      message.success('保存成功');
    } else {
      message.error(message);
    }
  }

  render() {
    const {
      showConfig,
      config,
      authRule,
      provinceId,
      provinceList,
      cities,
      cityId,
      financeMinScore1,
      financeMaxScore1,
      financeExplainDesc1,
      financeMinScore2,
      financeMaxScore2,
      financeExplainDesc2,
      financeMinScore3,
      financeMaxScore3,
      financeExplainDesc3,
      financeMinScore4,
      financeMaxScore4,
      financeExplainDesc4,
      ipMinScore1,
      ipMaxScore1,
      ipExplainDesc1,
      ipMinScore2,
      ipMaxScore2,
      ipExplainDesc2,
      ipMinScore3,
      ipMaxScore3,
      ipExplainDesc3,
      ipMinScore4,
      ipMaxScore4,
      ipExplainDesc4,
      manageMinScore1,
      manageMaxScore1,
      manageExplainDesc1,
      manageMinScore2,
      manageMaxScore2,
      manageExplainDesc2,
      manageMinScore3,
      manageMaxScore3,
      manageExplainDesc3,
      manageMinScore4,
      manageMaxScore4,
      manageExplainDesc4,
      summaryMinScore1,
      summaryMaxScore1,
      summaryExplainDesc1,
      summaryMinScore2,
      summaryMaxScore2,
      summaryExplainDesc2,
      summaryMinScore3,
      summaryMaxScore3,
      summaryExplainDesc3,
      summaryMinScore4,
      summaryMaxScore4,
      summaryExplainDesc4,
    } = this.state;

    return (
      <PageHeaderLayout title="高企配置">
        <Card bordered={false}>
          <div className={styles.tableList}>
            <div className={styles.tableListForm}>
              <Select
                style={{ width: '300px' }}
                placeholder=""
                value={this.state.authRule}
                onChange={this.handleSelectOnchange.bind(this, 'authRule')}
              >
                <Option key={0} value={0}>
                  国家高新技术企业认证规则设定
                </Option>
                <Option key={1} value={1}>
                  省市高新技术企业入库规则设定
                </Option>
              </Select>

              {authRule === 1 && (
                <Select
                  style={{ width: '200px', marginLeft: '20px' }}
                  placeholder=""
                  value={provinceId + ''}
                  onChange={this.handleSelectOnchange.bind(this, 'provinceId')}
                >
                  {provinceList.map(item => {
                    return (
                      <Option key={item.id} value={item.id + ''}>
                        {item.name}
                      </Option>
                    );
                  })}
                </Select>
              )}

              {authRule === 1 && (
                <Select
                  style={{ width: '200px', marginLeft: '20px' }}
                  placeholder=""
                  value={cityId + ''}
                  onChange={this.handleSelectOnchange.bind(this, 'cityId')}
                >
                  {cities.map(item => {
                    return (
                      <Option key={item.id} value={item.id + ''}>
                        {item.name}
                      </Option>
                    );
                  })}
                </Select>
              )}

              <span style={{ marginLeft: '20px' }}>
                <Button type="primary" onClick={this.evalConfigList.bind(this)}>
                  进入配置
                </Button>
              </span>
            </div>

            {showConfig && (
              <div className={[styles.tableListForm]} style={{ marginTop: '40px' }}>
                <DescriptionList size="large" title="基础条件配置" col="1">
                  <Description>
                    1. 企业注册时间:{' '}
                    <Input
                      style={{ width: 100 }}
                      value={config.regToYear}
                      onChange={this.handleConfigOnchange.bind(this, 'regToYear')}
                    />年
                  </Description>
                  <Description term="">2、企业主要产品（服务）符合国家高新技术领域范围</Description>
                  <Description term="">
                    3、科技人员占总员工比例：<Input
                      style={{ width: 100 }}
                      value={config.researcherRate}
                      onChange={this.handleConfigOnchange.bind(this, 'researcherRate')}
                    />{' '}
                    %
                  </Description>
                  <Description term="">4、行政处罚情况：无</Description>
                  <Description>
                    5. 总分要求:{' '}
                    <Input
                      style={{ width: 100 }}
                      value={config.totalScoreReq}
                      onChange={this.handleConfigOnchange.bind(this, 'totalScoreReq')}
                    />分
                  </Description>
                </DescriptionList>

                <DescriptionList
                  size="large"
                  title="知识产权项配置"
                  col="1"
                  style={{ marginTop: '20px' }}
                >
                  <Description>
                    {this.renderTable1()}
                    {this.renderTable2()}
                    {this.renderTable3()}
                    {this.renderTable4()}
                    {this.renderTable5()}
                    {this.renderTable6()}
                  </Description>
                </DescriptionList>

                <DescriptionList
                  size="large"
                  title="企业研发管理状态配置"
                  col="1"
                  style={{ marginTop: '20px' }}
                >
                  <Description>
                    {this.renderTable7()}
                    {this.renderTable8()}
                    {this.renderTable9()}
                    {this.renderTable10()}
                  </Description>
                </DescriptionList>

                <DescriptionList
                  size="large"
                  title="企业财务状况配置："
                  col="1"
                  style={{ marginTop: '20px' }}
                >
                  <Description>
                    {this.renderTable11()}
                    {this.renderTable12()}
                    {this.renderTable13()}
                    {this.renderTable14()}
                    {this.renderTable15()}
                  </Description>
                </DescriptionList>

                <DescriptionList
                  size="large"
                  title="解读内容"
                  col="1"
                  style={{ marginTop: '20px' }}
                >
                  <Description>
                    <div>知识产权类解读内容</div>
                    <Row>
                      <Col span={6}>
                        <Input
                          placeholder="最小分(包含)"
                          style={{ width: 120 }}
                          value={ipMinScore1}
                          onChange={this.handleOnchange.bind(this, 'ipMinScore1')}
                        />{' '}
                        到{' '}
                        <Input
                          placeholder="最大分(不包含)"
                          style={{ width: 120 }}
                          value={ipMaxScore1}
                          onChange={this.handleOnchange.bind(this, 'ipMaxScore1')}
                        />
                        <textarea
                          name
                          id
                          cols={25}
                          rows={5}
                          maxLength={200}
                          placeholder=""
                          value={ipExplainDesc1}
                          onChange={this.handleOnchange.bind(this, 'ipExplainDesc1')}
                        />
                      </Col>
                      <Col span={6}>
                        <Input
                          placeholder="最小分(包含)"
                          style={{ width: 120 }}
                          value={ipMinScore2}
                          onChange={this.handleOnchange.bind(this, 'ipMinScore2')}
                        />{' '}
                        到{' '}
                        <Input
                          placeholder="最大分(不包含)"
                          style={{ width: 120 }}
                          value={ipMaxScore2}
                          onChange={this.handleOnchange.bind(this, 'ipMaxScore2')}
                        />
                        <textarea
                          name
                          id
                          cols={25}
                          rows={5}
                          maxLength={200}
                          placeholder=""
                          value={ipExplainDesc2}
                          onChange={this.handleOnchange.bind(this, 'ipExplainDesc2')}
                        />
                      </Col>
                      <Col span={6}>
                        <Input
                          placeholder="最小分(包含)"
                          style={{ width: 120 }}
                          value={ipMinScore3}
                          onChange={this.handleOnchange.bind(this, 'ipMinScore3')}
                        />{' '}
                        到{' '}
                        <Input
                          placeholder="最大分(不包含)"
                          style={{ width: 120 }}
                          value={ipMaxScore3}
                          onChange={this.handleOnchange.bind(this, 'ipMaxScore3')}
                        />
                        <textarea
                          name
                          id
                          cols={25}
                          rows={5}
                          maxLength={200}
                          placeholder=""
                          value={ipExplainDesc3}
                          onChange={this.handleOnchange.bind(this, 'ipExplainDesc3')}
                        />
                      </Col>
                      <Col span={6}>
                        <Input
                          placeholder="最小分(包含)"
                          style={{ width: 120 }}
                          value={ipMinScore4}
                          onChange={this.handleOnchange.bind(this, 'ipMinScore4')}
                        />{' '}
                        到{' '}
                        <Input
                          placeholder="最大分(不包含)"
                          style={{ width: 120 }}
                          value={ipMaxScore4}
                          onChange={this.handleOnchange.bind(this, 'ipMaxScore4')}
                        />
                        <textarea
                          name
                          id
                          cols={25}
                          rows={5}
                          maxLength={200}
                          placeholder=""
                          value={ipExplainDesc4}
                          onChange={this.handleOnchange.bind(this, 'ipExplainDesc4')}
                        />
                      </Col>
                    </Row>
                  </Description>

                  <Description>
                    <div>企业财务类解读内容</div>
                    <Row>
                      <Col span={6}>
                        <Input
                          placeholder="最小分(包含)"
                          style={{ width: 120 }}
                          value={financeMinScore1}
                          onChange={this.handleOnchange.bind(this, 'financeMinScore1')}
                        />{' '}
                        到{' '}
                        <Input
                          placeholder="最大分(不包含)"
                          style={{ width: 120 }}
                          value={financeMaxScore1}
                          onChange={this.handleOnchange.bind(this, 'financeMaxScore1')}
                        />
                        <textarea
                          name
                          id
                          cols={25}
                          rows={5}
                          maxLength={200}
                          placeholder=""
                          value={financeExplainDesc1}
                          onChange={this.handleOnchange.bind(this, 'financeExplainDesc1')}
                        />
                      </Col>
                      <Col span={6}>
                        <Input
                          placeholder="最小分(包含)"
                          style={{ width: 120 }}
                          value={financeMinScore2}
                          onChange={this.handleOnchange.bind(this, 'financeMinScore2')}
                        />{' '}
                        到{' '}
                        <Input
                          placeholder="最大分(不包含)"
                          style={{ width: 120 }}
                          value={financeMaxScore2}
                          onChange={this.handleOnchange.bind(this, 'financeMaxScore2')}
                        />
                        <textarea
                          name
                          id
                          cols={25}
                          rows={5}
                          maxLength={200}
                          placeholder=""
                          value={financeExplainDesc2}
                          onChange={this.handleOnchange.bind(this, 'financeExplainDesc2')}
                        />
                      </Col>
                      <Col span={6}>
                        <Input
                          placeholder="最小分(包含)"
                          style={{ width: 120 }}
                          value={financeMinScore3}
                          onChange={this.handleOnchange.bind(this, 'financeMinScore3')}
                        />{' '}
                        到{' '}
                        <Input
                          placeholder="最大分(不包含)"
                          style={{ width: 120 }}
                          value={financeMaxScore3}
                          onChange={this.handleOnchange.bind(this, 'financeMaxScore3')}
                        />
                        <textarea
                          name
                          id
                          cols={25}
                          rows={5}
                          maxLength={200}
                          placeholder=""
                          value={financeExplainDesc3}
                          onChange={this.handleOnchange.bind(this, 'financeExplainDesc3')}
                        />
                      </Col>
                      <Col span={6}>
                        <Input
                          placeholder="最小分(包含)"
                          style={{ width: 120 }}
                          value={financeMinScore4}
                          onChange={this.handleOnchange.bind(this, 'financeMinScore4')}
                        />{' '}
                        到{' '}
                        <Input
                          placeholder="最大分(不包含)"
                          style={{ width: 120 }}
                          value={financeMaxScore4}
                          onChange={this.handleOnchange.bind(this, 'financeMaxScore4')}
                        />
                        <textarea
                          name
                          id
                          cols={25}
                          rows={5}
                          maxLength={200}
                          placeholder=""
                          value={financeExplainDesc4}
                          onChange={this.handleOnchange.bind(this, 'financeExplainDesc4')}
                        />
                      </Col>
                    </Row>
                  </Description>

                  <Description>
                    <div>企业研发管理类解读内容</div>
                    <Row>
                      <Col span={6}>
                        <Input
                          placeholder="最小分(包含)"
                          style={{ width: 120 }}
                          value={manageMinScore1}
                          onChange={this.handleOnchange.bind(this, 'manageMinScore1')}
                        />{' '}
                        到{' '}
                        <Input
                          placeholder="最大分(不包含)"
                          style={{ width: 120 }}
                          value={manageMaxScore1}
                          onChange={this.handleOnchange.bind(this, 'manageMaxScore1')}
                        />
                        <textarea
                          name
                          id
                          cols={25}
                          rows={5}
                          maxLength={200}
                          placeholder=""
                          value={manageExplainDesc1}
                          onChange={this.handleOnchange.bind(this, 'manageExplainDesc1')}
                        />
                      </Col>
                      <Col span={6}>
                        <Input
                          placeholder="最小分(包含)"
                          style={{ width: 120 }}
                          value={manageMinScore2}
                          onChange={this.handleOnchange.bind(this, 'manageMinScore2')}
                        />{' '}
                        到{' '}
                        <Input
                          placeholder="最大分(不包含)"
                          style={{ width: 120 }}
                          value={manageMaxScore2}
                          onChange={this.handleOnchange.bind(this, 'manageMaxScore2')}
                        />
                        <textarea
                          name
                          id
                          cols={25}
                          rows={5}
                          maxLength={200}
                          placeholder=""
                          value={manageExplainDesc2}
                          onChange={this.handleOnchange.bind(this, 'manageExplainDesc2')}
                        />
                      </Col>
                      <Col span={6}>
                        <Input
                          placeholder="最小分(包含)"
                          style={{ width: 120 }}
                          value={manageMinScore3}
                          onChange={this.handleOnchange.bind(this, 'manageMinScore3')}
                        />{' '}
                        到{' '}
                        <Input
                          placeholder="最大分(不包含)"
                          style={{ width: 120 }}
                          value={manageMaxScore3}
                          onChange={this.handleOnchange.bind(this, 'manageMaxScore3')}
                        />
                        <textarea
                          name
                          id
                          cols={25}
                          rows={5}
                          maxLength={200}
                          placeholder=""
                          value={manageExplainDesc3}
                          onChange={this.handleOnchange.bind(this, 'manageExplainDesc3')}
                        />
                      </Col>
                      <Col span={6}>
                        <Input
                          placeholder="最小分(包含)"
                          style={{ width: 120 }}
                          value={manageMinScore4}
                          onChange={this.handleOnchange.bind(this, 'manageMinScore4')}
                        />{' '}
                        到{' '}
                        <Input
                          placeholder="最大分(不包含)"
                          style={{ width: 120 }}
                          value={manageMaxScore4}
                          onChange={this.handleOnchange.bind(this, 'manageMaxScore4')}
                        />
                        <textarea
                          name
                          id
                          cols={25}
                          rows={5}
                          maxLength={200}
                          placeholder=""
                          value={manageExplainDesc4}
                          onChange={this.handleOnchange.bind(this, 'manageExplainDesc4')}
                        />
                      </Col>
                    </Row>
                  </Description>

                  <Description>
                    <div>总体得分解读</div>
                    <Row>
                      <Col span={6}>
                        <Input
                          placeholder="最小分(包含)"
                          style={{ width: 120 }}
                          value={summaryMinScore1}
                          onChange={this.handleOnchange.bind(this, 'summaryMinScore1')}
                        />{' '}
                        到{' '}
                        <Input
                          placeholder="最大分(不包含)"
                          style={{ width: 120 }}
                          value={summaryMaxScore1}
                          onChange={this.handleOnchange.bind(this, 'summaryMaxScore1')}
                        />
                        <textarea
                          name
                          id
                          cols={25}
                          rows={5}
                          maxLength={200}
                          placeholder=""
                          value={summaryExplainDesc1}
                          onChange={this.handleOnchange.bind(this, 'summaryExplainDesc1')}
                        />
                      </Col>
                      <Col span={6}>
                        <Input
                          placeholder="最小分(包含)"
                          style={{ width: 120 }}
                          value={summaryMinScore2}
                          onChange={this.handleOnchange.bind(this, 'summaryMinScore2')}
                        />{' '}
                        到{' '}
                        <Input
                          placeholder="最大分(不包含)"
                          style={{ width: 120 }}
                          value={summaryMaxScore2}
                          onChange={this.handleOnchange.bind(this, 'summaryMaxScore2')}
                        />
                        <textarea
                          name
                          id
                          cols={25}
                          rows={5}
                          maxLength={200}
                          placeholder=""
                          value={summaryExplainDesc2}
                          onChange={this.handleOnchange.bind(this, 'summaryExplainDesc2')}
                        />
                      </Col>
                      <Col span={6}>
                        <Input
                          placeholder="最小分(包含)"
                          style={{ width: 120 }}
                          value={summaryMinScore3}
                          onChange={this.handleOnchange.bind(this, 'summaryMinScore3')}
                        />{' '}
                        到{' '}
                        <Input
                          placeholder="最大分(不包含)"
                          style={{ width: 120 }}
                          value={summaryMaxScore3}
                          onChange={this.handleOnchange.bind(this, 'summaryMaxScore3')}
                        />
                        <textarea
                          name
                          id
                          cols={25}
                          rows={5}
                          maxLength={200}
                          placeholder=""
                          value={summaryExplainDesc3}
                          onChange={this.handleOnchange.bind(this, 'summaryExplainDesc3')}
                        />
                      </Col>
                      <Col span={6}>
                        <Input
                          placeholder="最小分(包含)"
                          style={{ width: 120 }}
                          value={summaryMinScore4}
                          onChange={this.handleOnchange.bind(this, 'summaryMinScore4')}
                        />{' '}
                        到{' '}
                        <Input
                          placeholder="最大分(不包含)"
                          style={{ width: 120 }}
                          value={summaryMaxScore4}
                          onChange={this.handleOnchange.bind(this, 'summaryMaxScore4')}
                        />
                        <textarea
                          name
                          id
                          cols={25}
                          rows={5}
                          maxLength={200}
                          placeholder=""
                          value={summaryExplainDesc4}
                          onChange={this.handleOnchange.bind(this, 'summaryExplainDesc4')}
                        />
                      </Col>
                    </Row>
                  </Description>
                </DescriptionList>

                <DescriptionList
                  size="large"
                  title="中高服务宣传内容展示: "
                  col="1"
                  style={{ marginTop: '20px' }}
                >
                  <Description>
                    <textarea
                      name
                      id
                      cols={100}
                      rows={5}
                      maxLength={200}
                      placeholder="中高服务宣传内容展示"
                      value={config.content}
                      onChange={this.handleConfigOnchange.bind(this, 'content')}
                    />
                  </Description>
                </DescriptionList>

                <div style={{ marginLeft: '20px' }}>
                  <Button type="primary" onClick={this.evalConfigSave.bind(this)}>
                    保存
                  </Button>
                </div>
              </div>
            )}
          </div>
        </Card>
      </PageHeaderLayout>
    );
  }
}
